﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace OwnAttribute
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach (MethodInfo mi in typeof(Foo).GetMethods())
            {
                TestAttribute att = (TestAttribute)Attribute.GetCustomAttribute
                (mi, typeof(TestAttribute));
                if (att != null)
                    Console.WriteLine("Method {0} will be tested; reps={1}; msg={2}",
                    mi.Name, att.Repetitions, att.FailureMessage);
            }
        }
    }
}
